function priceCheck(ev) {
	var chk1 = document.getElementById('price1');
	var chk2 = document.getElementById('price2');
	ev.value=ev.checked;
	//alert(ev.value);
	chk1.disabled = !ev.checked;
	chk2.disabled = !ev.checked;
	if(chk1.disabled)
		{
		chk1.value="";
		chk2.value="";
		}
}

function on_select(ev){
    var select1=document.getElementById('big');
	var select2= document.getElementById('small');
    //alert(ev.value);
	var   j=select2.length; 
    for(var k=1;k<j;k++) 
    { 
    	select2.remove(1); 
    }
	if(ev.value=="0")
		return;
	var small_classes=classes[""+ev.value];
	for(var i=0;i<small_classes.length;i++){
     var Option=document.createElement("OPTION");
	  Option.text=small_classes[i]["name"];
      Option.value=small_classes[i]["name"];
       select2.options.add(Option);
	}
}



function on_init(bname,sname)
{
	
   if(bname=="")
   { return;}
	var select1= document.getElementById('big');
	var select2= document.getElementById('small');
	for (var i = 0; i < select1.options.length; i++) {        
		 if (select1.options[i].text == bname) {        
		     select1.options[i].selected = true;   
		     }
	}
	var   j=select2.length; 
	
    for(var k=1;k<j;k++) 
    { 
    	select2.remove(1); 
    }
    //alert("here");
	if(select1.value=="0")
		{return;}
	else{
		//alert(sname);
	var small_classes=classes[""+bname];
	for(var i=0;i<small_classes.length;i++){
     var Option=document.createElement("OPTION");
	  Option.text=small_classes[i]["name"];
      Option.value=small_classes[i]["name"];
       select2.options.add(Option);
	}
	//alert("avc");
	if(sname=="0")
	{return;}
	else{
		for (var i = 0; i < select2.options.length; i++) {        
	 if (select2.options[i].text == sname) {        
	 select2.options[i].selected = true;   
	 }
		}
	}
	
	}

	}